package com.lkd.mapper;

import com.lkd.entity.ShoppingCart;
import org.apache.ibatis.annotations.Param;

/**
* @author Lenovo
* @description 针对表【shopping_cart(购物车表)】的数据库操作Mapper
* @createDate 2023-07-03 20:00:57
* @Entity com.lkd.entity.ShoppingCart
*/
public interface ShoppingCartMapper {

    int deleteByPrimaryKey(Long id);

    int insert(ShoppingCart record);

    int insertSelective(ShoppingCart record);

    ShoppingCart selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ShoppingCart record);

    int updateByPrimaryKey(ShoppingCart record);

    ShoppingCart checkShoppingCart(ShoppingCart shoppingCart);

    int deleteByuserIdgoodsId(@Param("userId") Long userId, @Param("goodsId") Long goodsId);

    Integer addGoods(@Param("userId") int userId, @Param("goodsId")int goodsId);

    int insertGoods(ShoppingCart shoppingCart);

    ShoppingCart shoppingCartUsersGoods(@Param("userId")Integer userId, @Param("goodsId")Integer goodsId);

    int downGoods(@Param("userId") int userId, @Param("goodsId") int goodsId);
}
